﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<QianBuo.Lottery.Web.Models.LeftModel>" %>
<% 
    this.ViewContext.RouteData.Values.Remove("id");
    string col = Request["cont"] ?? TempData["controller"] as string,
        act = Request["act"] ?? TempData["action"] as string;
    Func<string, string, string> ckmenu = (col1, act1) => col1.Equals(col, StringComparison.CurrentCultureIgnoreCase) && act1.Equals(act, StringComparison.CurrentCultureIgnoreCase) ? "left_menu_sub_current" : "left_menu_sub_off";

%>
<% var toolbar = (Session["ShowToolBar"] as bool? ?? true); %>
<div id="divScript" style="display: none;">
    <script type="text/javascript">
        $(document).ready(function () {
            if(showToolBar==false){
                $("#toolbar").hide(500);
            }
            window.setTimeout(RefreshTopBar, 5000);
            $("#ling_toolbar").click(function(){
                if(showToolBar){
                    showToolBar=false;
                    $("#toolbar").hide(500);
                }
                else{
                    showToolBar=true;
                    $("#toolbar").show(500);
                }
                $("#toolbar").load('<%=Url.Action("ToolBar") %>', { r: Math.random(),ShowToolBar:showToolBar });
            });
            for (var i = 1; i <= 8; i++) {
                $('.left_menu_bar #left_menu_bal_td'+i).css('width','32px').css('height','33px').css("background",'url(<%=Url.Content("~/Content/img/Left/") %>'+i+'.gif) no-repeat');
            }
            $('.left_menu_bar').css('background','none');
        }); 
        
        var showToolBar=<%=toolbar.ToString().ToLower() %>;
        function RefreshTopBar() {
            window.setTimeout(RefreshTopBar, 5000);
            if(showToolBar)
                $("#toolbar").load('<%=Url.Action("ToolBar") %>', { r: Math.random(),ShowToolBar:showToolBar });
        }
        function ChangeToolBar(obj) { 
            
        }
    </script>
</div>
<div class="left_div_body">
    <div class="toolbar_hander" id="ling_toolbar">
        <table>
            <tr>
                <td id='toolbar_hander_td1'>
                </td>
                <td>
                    用户信息
                </td>
            </tr>
        </table>
    </div>
    <div class="left_toolbar" id="toolbar">
        <%if (toolbar)
          { %><%=Html.Action("ToolBar")%><%} %>
    </div>
    <div class="left_div_menu">
        <% if (ViewContext.HttpContext.User.IsInRole("Surrogate"))
           {%>
        <div class="left_menu_bar">
            <table>
                <tr>
                    <td id='left_menu_bal_td1'>
                    </td>
                    <td>
                        代理管理
                    </td>
                </tr>
            </table>
        </div>
        <div id="left_menu_sub_1" class="left_menu_sub">
            <div style="float: left; width: 100%">
                <div style="float: left; width: 49%; height: 15px; border-right:1px solid white;">
                    <%=Html.ActionLink("添加会员", "Add", "Surrogate", new { @class = ckmenu("Surrogate", "Add") })%>
                  </div>
                <div style="float: left; width: 49%; height: 15px;">
                    <%=Html.ActionLink("会员管理", "Childs", "Surrogate", new { @class = ckmenu("Surrogate", "Childs") ?? ckmenu("Surrogate", "PlayTypeOption") })%>
                 </div>
                 <div style="height:18px; width:100%">
                 </div>
                <%var Type = (TempData["Surrogate_AllChild.Where.Type"] ?? string.Empty).ToString(); %>
                <div style="float: left; width: 49%; height: 15px; border-right:1px solid white;">
                    <%=Html.ActionLink("会员列表", "AllChild", "Surrogate", new { @class =Type==string.Empty?ckmenu("Surrogate", "AllChild"):"" })%>
                </div>
                <div style="float: left; width: 49%; height: 15px;">
                    <%=Html.ActionLink("用户一览", "ChildView", "Surrogate", new { @class = ckmenu("Surrogate", "ChildView") })%>
                    
                   </div>
                <div style="height:18px; width:100%">
                </div>
                <div style="float: left; width: 49%; height: 15px; border-right:1px solid white;">
                    <%=Html.ActionLink("在线用户", "AllChild", "Surrogate", Url.Route(new { Where = new { @Type = QianBuo.Lottery.Web.Models.User.AllChidl_Where_Type.OnLine }}), Url.Route(new { @class = Type != "OnLine" ? "" : ckmenu("Surrogate", "AllChild") }))%>
                </div>
                <div style="float: left; width: 49%; height: 15px;">
                    <%=Html.ActionLink("离线用户", "AllChild", "Surrogate", Url.Route(new { Where = new { @Type = QianBuo.Lottery.Web.Models.User.AllChidl_Where_Type.DowLine } }), Url.Route(new { @class = Type != "DowLine" ? "" : ckmenu("Surrogate", "AllChild") }))%>
                 </div>
              <div style="height:18px; width:100%">
              </div>
                <div style="float: left; width: 49%; height: 15px; border-right:1px solid white;">
                    <%=Html.ActionLink("有额账户", "AllChild", "Surrogate", Url.Route(new { Where = new { @Type = QianBuo.Lottery.Web.Models.User.AllChidl_Where_Type.Richly } }), Url.Route(new { @class = Type != "Richly" ? "" : ckmenu("Surrogate", "AllChild") }))%>
                    </div>
                <div style="float: left; width: 49%; height: 15px;">
                    <%=Html.ActionLink("无额账户", "AllChild", "Surrogate", Url.Route(new { Where = new { @Type = QianBuo.Lottery.Web.Models.User.AllChidl_Where_Type.Poor } }), Url.Route(new { @class = Type != "Poor" ? "" : ckmenu("Surrogate", "AllChild") }))%>
                    </div>
               <div style="height:18px; width:100%"></div>
                <div style="float: left; width: 49%; height: 15px; border-right:1px solid white;">
                    <%=Html.ActionLink("今日注册", "AllChild", "Surrogate", Url.Route(new { Where = new { @Type = QianBuo.Lottery.Web.Models.User.AllChidl_Where_Type.RegestNow } }), Url.Route(new { @class = Type != "RegestNow" ? "" : ckmenu("Surrogate", "AllChild") }))%>
                    </div>
                <%if (Code.BLL.CacheManage.OptionSite[Code.Models.Option_Site_Key.User_CanAddSubMoney].ToBool(false))
                  { %>
                <div style="float: left; width: 49%; height: 15px;">
                    <%=Html.ActionLink("为下级充值", "MoveMoney", "Surrogate", new { @class = ckmenu("Surrogate", "MoveMoney") })%>
                 </div>
                <%} %>
            
                <%if (Code.BLL.CacheManage.OptionSite[Code.Models.Option_Site_Key.Site_AddChildConfig_Enable].ToBool(false))
                  { %>
                   <div style="height:18px; width:100%"></div>
                <div style="float: left; width: 49%; height: 15px; border-right:1px solid white;">
                    <%=Html.ActionLink("配额设置", "SetAddChildConfig", "Surrogate", new { @class = ckmenu("Surrogate", "SetAddChildConfig") })%>
                   </div>
                <%} %>
              <%if (Code.BLL.CacheManage.OptionSite[Code.Models.Option_Site_Key.Site_Lottery_UseSiteBackMoneyRatio].ToBool(false)==false
                && Code.BLL.CacheManage.OptionSite[Code.Models.Option_Site_Key.Site_Lottery_UseSiteWinMoney].ToBool(false)==false)
                {%>
                <div style="float: left; width: 49%; height: 15px;">
                    <%=Html.ActionLink("奖金/返点差", "SetWinMoneyMargin", "Surrogate", new { @class = ckmenu("Surrogate", "SetWinMoneyMargin") }) %>
                   </div>
                <%} %>
            </div>
            <table width="100%" border="0">
                <%var AccountReport_Serch_Type = Request["arst"] ?? (TempData["Surrogate_AccountReport_Serch.Type"] ?? string.Empty).ToString(); %>
                <tr>
                    <th colspan="2" align="left">
                        &nbsp;我的团队
                    </th>
                </tr>
                <tr>
                    <td class="singleitem">
                        <%=Html.ActionLink("所有明细", "AccountDetail", "Surrogate", Url.Route(new { Serch = new { Type = "" } }), Url.Route(new { @class = (AccountReport_Serch_Type == "" || AccountReport_Serch_Type == "Freez") ? ckmenu("Surrogate", "AccountDetail") : "" }))%>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td>
                        <%=Html.ActionLink("团队报表", "TeamReport", "Surrogate", Url.Route(null), Url.Route(new { @class = ckmenu("Surrogate", "TeamReport") }))%>
                    </td>
                    <td>
                        <%=Html.ActionLink("团队余额", "GroupMoney", "Surrogate", Url.Route(null), Url.Route(new { @class = ckmenu("Surrogate", "GroupMoney") }))%>
                    </td>
                </tr>
                <tr>
                    <td width="49%">
                        <%=Html.ActionLink("团队购彩", "AccountDetail", "Surrogate", Url.Route(new { Serch = new { Type = "Play" } }), Url.Route(new { @class = AccountReport_Serch_Type != "Play" ? "" : ckmenu("Surrogate", "AccountDetail") }))%>
                    </td>
                    <td width="49%">
                        <%=Html.ActionLink("团队撤单", "AccountDetail", "Surrogate", Url.Route(new { Serch = new { Type = "QuashScheme" } }), Url.Route(new { @class = AccountReport_Serch_Type != "QuashScheme" ? "" : ckmenu("Surrogate", "AccountDetail") }))%>
                    </td>
                </tr>
                <tr>
                    <td width="49%">
                        <%=Html.ActionLink("团队提款", "AccountDetail", "Surrogate", Url.Route(new { Serch = new { Type = "TackMoney" } }), Url.Route(new { @class = AccountReport_Serch_Type != "TackMoney" ? "" : ckmenu("Surrogate", "AccountDetail") }))%>
                    </td>
                    <td width="49%">
                        <%=Html.ActionLink("团队充值", "AccountDetail", "Surrogate", Url.Route(new { Serch = new { Type = "AddMoney" } }), Url.Route(new { @class = AccountReport_Serch_Type != "AddMoney" ? "" : ckmenu("Surrogate", "AccountDetail") }))%>
                    </td>
                </tr>
                <tr>
                    <td width="49%">
                        <%=Html.ActionLink("团队返点", "AccountDetail", "Surrogate", Url.Route(new { Serch = new { Type = "BackMoney" } }), Url.Route(new { @class = AccountReport_Serch_Type != "BackMoney" ? "" : ckmenu("Surrogate", "AccountDetail") }))%>
                    </td>
                    <td width="49%">
                        <%=Html.ActionLink("下级返点", "AccountDetail", "Surrogate", Url.Route(new { Serch = new { Type = "BackMoney_Child" } }), Url.Route(new { @class = AccountReport_Serch_Type != "BackMoney_Child" ? "" : ckmenu("Surrogate", "AccountDetail") }))%>
                    </td>
                </tr>
                <tr>
                    <td width="49%">
                        <%=Html.ActionLink("团队中奖", "AccountDetail", "Surrogate", Url.Route(new { Serch = new { Type = "WinMoney" } }), Url.Route(new { @class = AccountReport_Serch_Type != "WinMoney" ? "" : ckmenu("Surrogate", "AccountDetail") }))%>
                    </td>
                    <td width="49%">
                        <%=Html.ActionLink("下级返奖", "AccountDetail", "Surrogate", Url.Route(new { Serch = new { Type = "WinMoney_Child" } }), Url.Route(new { @class = AccountReport_Serch_Type != "WinMoney_Child" ? "" : ckmenu("Surrogate", "AccountDetail") }))%>
                    </td>
                </tr>
                <tr>
                    <td width="49%">
                        <%=Html.ActionLink("追号明细", "AccountDetail", "Surrogate", Url.Route(new { Serch = new { Type = "ChaseTask" } }), Url.Route(new { @class = AccountReport_Serch_Type != "ChaseTask" ? "" : ckmenu("Surrogate", "AccountDetail") }))%>
                    </td>
                    <td width="49%">
                        <%=Html.ActionLink("其它明细", "AccountDetail", "Surrogate", Url.Route(new { Serch = new { Type = "Other" } }), Url.Route(new { @class = AccountReport_Serch_Type != "Other" ? "" : ckmenu("Surrogate", "AccountDetail") }))%>
                    </td>
                </tr>
            </table>
        </div>
        <%} %>
        <div class="left_menu_bar">
            <table>
                <tr>
                    <td id='left_menu_bal_td2'>
                    </td>
                    <td>
                        <%=Html.ActionLink("本期方案", "Index", "Scheme", new { @class = ckmenu("Scheme", "Index") })%>
                    </td>
                </tr>
            </table>
        </div>
        <div id="left_menu_sub_2" class="left_menu_sub">
        </div>
        <div class="left_menu_bar">
            <table>
                <tr>
                    <td id='left_menu_bal_td3'>
                    </td>
                    <td>
                        我的账户
                    </td>
                </tr>
            </table>
        </div>
        <div id="left_menu_sub_3" class="left_menu_sub">
            <%var type = (Request["arst"] ?? TempData["Account_Report_Serch.Type"] ?? string.Empty).ToString(); %>
            <table width="100%" border="0">
                <tr>
                    <th colspan="2" align="left">
                        &nbsp;<%=Html.ActionLink("账户明细", "Detail", "Account", Url.Route(new { Serch = new { Type = "" } }), Url.Route(new { @class = (type == "" || type == "Freez") ? ckmenu("Account", "Detail") : "" }))%>
                    </th>
                </tr>
                <tr>
                    <td width="49%">
                        <%=Html.ActionLink("我的购彩", "Detail", "Account", Url.Route(new { Serch = new { Type = "Play" } }), Url.Route(new { @class = type != "Play" ? "" : ckmenu("Account", "Detail") }))%>
                    </td>
                    <td width="49%">
                        <%=Html.ActionLink("我的撤单", "Detail", "Account", Url.Route(new { Serch = new { Type = "QuashScheme" } }), Url.Route(new { @class = type != "QuashScheme" ? "" : ckmenu("Account", "Detail") }))%>
                    </td>
                </tr>
                <tr>
                    <td width="49%">
                        <%=Html.ActionLink("我的提款", "Detail", "Account", Url.Route(new { Serch = new { Type = "TackMoney" } }), Url.Route(new { @class = type != "TackMoney" ? "" : ckmenu("Account", "Detail") }))%>
                    </td>
                    <td width="49%">
                        <%=Html.ActionLink("我的充值", "Detail", "Account", Url.Route(new { Serch = new { Type = "AddMoney" } }), Url.Route(new { @class = type != "AddMoney" ? "" : ckmenu("Account", "Detail") }))%>
                    </td>
                </tr>
                <tr>
                    <td width="49%">
                        <%=Html.ActionLink("我的返点", "Detail", "Account", Url.Route(new { Serch = new { Type = "BackMoney" } }), Url.Route(new { @class = type != "BackMoney" ? "" : ckmenu("Account", "Detail") }))%>
                    </td>
                    <td width="49%">
                        <%=Html.ActionLink("下级返点", "Detail", "Account", Url.Route(new { Serch = new { Type = "BackMoney_Child" } }), Url.Route(new { @class = type != "BackMoney_Child" ? "" : ckmenu("Account", "Detail") }))%>
                    </td>
                </tr>
                <tr>
                    <td width="49%">
                        <%=Html.ActionLink("我的中奖", "Detail", "Account", Url.Route(new { Serch = new { Type = "WinMoney" } }), Url.Route(new { @class = type != "WinMoney" ? "" : ckmenu("Account", "Detail") }))%>
                    </td>
                    <td width="49%">
                        <%=Html.ActionLink("下级返奖", "Detail", "Account", Url.Route(new { Serch = new { Type = "WinMoney_Child" } }), Url.Route(new { @class = type != "WinMoney_Child" ? "" : ckmenu("Account", "Detail") }))%>
                    </td>
                </tr>
                <tr>
                    <td width="49%">
                        <%=Html.ActionLink("我的追号", "Detail", "Account", Url.Route(new { Serch = new { Type = "ChaseTask" } }), Url.Route(new { @class = type != "ChaseTask" ? "" : ckmenu("Account", "Detail") }))%>
                    </td>
                    <td width="49%">
                        <%=Html.ActionLink("其它明细", "Detail", "Account", Url.Route(new { Serch = new { Type = "Other" } }), Url.Route(new { @class = type != "Other" ? "" : ckmenu("Account", "Detail") }))%>
                    </td>
                </tr>
                <tr>
                    <th colspan="2" align="left">
                        &nbsp;财务管理
                    </th>
                </tr>
                <tr>
                    <td width="49%">
                        <%=Html.ActionLink("奖金设定", "WinMoney", "User", new {@class=ckmenu("User","WinMoney") })%>
                    </td>
                    <td width="49%">
                        <%=Html.ActionLink("申请提款", "TakeMoney", "User", new { @class = ckmenu("User", "TakeMoney") })%>
                    </td>
                </tr>
                <tr>
                    <td width="49%">
                        <%=Html.ActionLink("账户统计", "Report", "Account", new { @class = ckmenu("Account", "Report") })%>
                    </td>
                    <td width="49%">
                        <%=Html.ActionLink("提款详情", "TakeMoneyDetail", "User", new { @class = ckmenu("User", "TakeMoneyDetail") })%>
                    </td>
                </tr>
                <tr>
                    <th colspan="2" align="left">
                        &nbsp;安全中心
                    </th>
                </tr>
                <tr>
                    <td width="49%">
                        <%=Html.ActionLink("个人信息", "Detail", "User", new { @class = ckmenu("User", "Detail") })%>
                    </td>
                    <td width="49%">
                        <%=Html.ActionLink("锁定账户", "FreezUserMoney", "User", new { @class = ckmenu("User", "FreezUserMoney") })%>
                    </td>
                </tr>
                <tr>
                    <td width="49%">
                        <%=Html.ActionLink("登录密码", "EditLoginPwd", "User", new { @class = ckmenu("User", "EditLoginPwd") })%>
                    </td>
                    <td width="49%">
                        <%=Html.ActionLink("提款密码", "EditTakePwd", "User", new { @class = ckmenu("User", "EditTakePwd") })%>
                    </td>
                </tr>
            </table>
        </div>
        <div class="left_menu_bar">
            <table>
                <tr>
                    <td id='left_menu_bal_td4'>
                    </td>
                    <td>
                        游戏记录
                    </td>
                </tr>
            </table>
        </div>
        <div id="left_menu_sub_4" class="left_menu_sub">
            <table width="100%" border="0">
                <% 
                    var lotterys = Code.BLL.CacheManage.Lottery.Where(p => p.Value.State == (int)Code.Models.LotteryState.Normal).OrderBy(p => p.Value.ID).OrderBy(p => p.Value.Sort).Select(p => new { p.Value.ID, p.Value.Name });
                %>
                <tr>
                    <th colspan='2' align="left">
                        &nbsp;<%=Html.ActionLink("历史投注", "History", "Scheme", new { @class = ckmenu("Scheme", "History")??ckmenu("Scheme","HistoryDetail") })%>
                    </th>
                </tr>
                <tr>
                    <% var i = 0;
                       foreach (var lottery in lotterys)
                       {
                           if (i == 2)
                           {
                               i = 0;
                    %></tr>
                <tr>
                    <%
                           }
                    %>
                    <td width='49%'>
                        <%=Html.ActionLink(lottery.Name, "History", "Scheme", Url.Route(new { where = new { LotteryID = lottery.ID } }), Url.Route())%>
                    </td>
                    <%
                           i++;
                       }
                       var link = Html.ActionLink("自助补奖", "History", "Scheme", Url.Route(new { type = QianBuo.Lottery.Web.Models.Scheme.DefaultModel.Type.SelfOpenWin }), Url.Route(new { @class = (TempData["type.SelfOpenWin"] as string) == "SelfOpenWin" ? ckmenu("Scheme", "History") : "" }));
                       if (i == 1)
                       { 
                    %><td>
                        <%=link%>
                    </td>
                </tr>
                <%
                       }
                       else
                       { 
                %></tr><tr>
                    <td>
                        <%=link %>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <%
                   }        
                %>
                <tr>
                    <th colspan='2' align="left">
                        &nbsp;<%=Html.ActionLink("追号列表","Index","ChaseTask",new {@class=ckmenu("ChaseTask","Index")??ckmenu("ChaseTask","Detail")}) %>
                    </th>
                </tr>
                <tr>
                    <% i = 0;
                       foreach (var lottery in lotterys)
                       {
                           if (i == 2)
                           {
                               i = 0;
                    %></tr>
                <tr>
                    <%
                           }
                    %>
                    <td width='49%'>
                        <%=Html.ActionLink(lottery.Name, "Index", "ChaseTask", Url.Route(new { Search = new { LotteryID = lottery.ID } }),Url.Route())%>
                    </td>
                    <%
                           i++;
                       }
                       if (i == 1)
                       { 
                    %><td>
                        &nbsp;
                    </td>
                </tr>
                <%
                       }
                       else
                       { 
                %></tr><%
                   }        
                %>
            </table>
        </div>
        <div class="left_menu_bar">
            <table>
                <tr>
                    <td id='left_menu_bal_td5'>
                    </td>
                    <td>
                        <a href="http://datachart.500wan.com/ssc/5jbzs.php" target="_blank">图表走势</a>
                    </td>
                </tr>
            </table>
        </div>
        <div id="left_menu_sub_5" class="left_menu_sub">
        </div>
        <div class="left_menu_bar">
            <table>
                <tr>
                    <td id='left_menu_bal_td6'>
                    </td>
                    <td>
                        开奖视频
                    </td>
                </tr>
            </table>
        </div>
        <div id="left_menu_sub_6" class="left_menu_sub">
            <table width="100%" border="0">
                <tr>
                    <td width="49%">
                        <a href="http://video.shishicai.cn/Assist/BonusVideo.aspx?lt=4&isTransfer=soft&u=www.shishicai.cn"
                            target="_blank">重庆时时彩</a>
                    </td>
                    <td width="49%">
                        <a href="http://video.shishicai.cn/Assist/BonusVideo.aspx?lt=5&isTransfer=soft&u=www.shishicai.cn"
                            target="_blank">江西时时彩</a>
                    </td>
                </tr>
                <tr>
                    <td width="49%">
                        <a href="http://video.shishicai.cn/Assist/BonusVideo.aspx?lt=21&isTransfer=soft&u=www.shishicai.cn"
                            target="_blank">黑龙江时时彩</a>
                    </td>
                    <td width="49%">
                        <a href="http://video.shishicai.cn/Assist/BonusVideo.aspx?lt=6&isTransfer=soft&u=www.shishicai.cn"
                            target="_blank">上海时时乐</a>
                    </td>
                </tr>
            </table>
        </div>
        <div class="left_menu_bar">
            <table>
                <tr>
                    <td id='left_menu_bal_td7'>
                    </td>
                    <td>
                        游戏工具
                    </td>
                </tr>
            </table>
        </div>
        <div id="left_menu_sub_7" class="left_menu_sub">
            <table width="100%" border="0">
                <tr>
                    <td width="49%">
                        <%=Html.ActionLink("计划工具", "PlayTool", "User", new { @class = ckmenu("User", "PlayTool") })%>
                    </td>
                    <td width="49%">
                        <%=Html.ActionLink("缩水软件", "OtherTool", "User", new {@class=ckmenu("User","OtherTool") })%>
                    </td>
                </tr>
            </table>
        </div>
        <div class="left_menu_bar">
            <table>
                <tr>
                    <td id='left_menu_bal_td8'>
                    </td>
                    <td>
                        帮助中心
                    </td>
                </tr>
            </table>
        </div>
        <div id="left_menu_sub_8" class="left_menu_sub">
            <table width="100%" border="0">
                <tr>
                    <td width="49%">
                        <%=Html.ActionLink("玩法介绍", "IntroPlay", "User", new {@class=ckmenu("User","IntroPlay") })%>
                    </td>
                    <td width="49%">
                        <%=Html.ActionLink("常见问题", "Questions", "User", new {@class=ckmenu("User","Questions") })%>
                    </td>
                </tr>
            </table>
        </div>
    </div>
</div>
<style type="text/css">
    .div
    {
        position: absolute;
        width: 300px;
        height: 100px;
        top: 156px;
        left: 430px;
        background-color: #88dd66;
        z-index: 100;
    }
</style>
